package com.project.bean;

import com.baomidou.mybatisplus.annotation.*;

@TableName("t_product")
public class ProductBean {
    @TableId(value = "pk_productId",type = IdType.AUTO)
    private Integer id;
    @TableField("p_name")
    private String name;
    @TableField("p_price")
    private Integer price;
    @TableField("p_version")
    @Version //标识该列为版本列
    private Integer version = 1;

    public ProductBean(String name, Integer price) {
        this.name = name;
        this.price = price;
    }

    public ProductBean() {
    }

    public Integer getId() {
        return id;
    }

    public void setId(Integer id) {
        this.id = id;
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public Integer getPrice() {
        return price;
    }

    public void setPrice(Integer price) {
        this.price = price;
    }

    public Integer getVersion() {
        return version;
    }

    public void setVersion(Integer version) {
        this.version = version;
    }
}
